<style>
    .upOut{
        position:relative;
        width:200px;
        height:200px;
        float: left;
        margin-right: 20px;
    }
    .upOut a img{
        width:200px;
        height:200px;
    }
    .upIn{
        width:10px;
        height:10px;
        z-index: 2;
        position:absolute;
        top:-8px;
        /*right:px;*/
        display:none;
        cursor:pointer;
        background-image:url('http://tour.com/static/Admin/cuo.jpeg');
    }
    .upOut:hover .upIn{
        display:block;
    }
</style>
{volist name="path" id="p"}
    <div class="col-xs-6 col-md-3 upOut ">
        <img src="http://tour.com/static/Admin/cuo.jpeg" class="upIn" alt="">
        <a href="#" class="thumbnail">
            <img src="{$p}" alt="">
            <input style="display: none;" type="text" name="img" value="{$p}">
        </a>
    </div>
{/volist}
<script>
    $('.upIn').on('click',function(){
        var $this = $(this);
        var path = $(this).closest('.upOut').find('input[name="img"]').val();
        //异步请求后台
        $.post("{:url('ware/ajaxDel')}",{path:path},function(data){
            $this.closest('.upOut').remove();
        });
    })
</script>






